﻿using System;
using System.Collections.Generic;

using System.Text;

namespace System.Qizx.Xml
{
    /*******************************/
    /// <summary>
    /// Manages the source XML document that will be transformed.
    /// </summary>
    public class DomSource : BasicSource
    {
        private string id;
        private System.Xml.XmlNode node;

        /// <summary>
        /// Gets and sets the Id of the DomSourceSupport instance.
        /// </summary>
        public virtual string Id
        {
            get
            {
                return this.id;
            }
            set
            {
                this.id = value;
            }
        }

        /// <summary>
        /// Gets and sets the XmlNode instance associated to the DomSourceSupport.
        /// </summary>
        public virtual System.Xml.XmlNode Node
        {
            get
            {
                return this.node;
            }
            set
            {
                this.node = value;
            }
        }

        /// <summary>
        /// Creates a new instance from a XmlNode with the specified Id.
        /// </summary>
        /// <param name="node">The XmlNode instance with the XML.</param>
        /// <param name="Id">The Id of the instance.</param>
        public DomSource(System.Xml.XmlNode Node, string Id)
        {
            this.id = Id;
            this.node = Node;
        }

        /// <summary>
        /// Creates a new instance from a XmlNode instance.
        /// </summary>
        /// <param name="node">The XmlNode instance to be used.</param>
        public DomSource(System.Xml.XmlNode Node)
        {
            this.id = "";
            this.node = Node;
        }
    }
}
